/**
 * meituan.com Inc.
 * Copyright (c) 2010-2023 All Rights Reserved.
 */
package com.recruit.common;

/**
 * <p>
 *
 * </p>
 *
 * @author denghufu
 * @version CurPool.java v1.0 2023/3/7 17:53 denghufu Exp $
 */

import com.recruit.model.UserDO;
import com.recruit.module.message.WebSocket;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 统一管理session、websocket、curUser
 */
public class CurPool {

    //    public static CopyOnWriteArraySet<WebSocket> webSockets =new CopyOnWriteArraySet<>();
    public static Map<Integer, WebSocket>    webSockets  = new ConcurrentHashMap<>();
    // list 里面第一个存sessionId，第二个存session
    public static Map<Integer, List<Object>> sessionPool = new ConcurrentHashMap<>();
    // 当前登录用户x
    public static Map<String, UserDO>        curUserPool = new ConcurrentHashMap<>();

}
